//
//  Log.swift
//  maopu
//
//  Created by 黄海波 on 2017/4/1.
//  Copyright © 2017年 maopu. All rights reserved.
//

import UIKit

class Log: NSObject {
    
    static let shared:Log = {
        let log = Log()
        return log
    }()
    
    private let isOpen:Bool = true
    
    public func printLog(_ tag:String , str:Any?){
        if isOpen{
            print("---------TAG:\(tag) ----  message:\(String(describing: str))")
        }
    }
    
    public func printLog<T>(_ message:T , file:NSString = #file , method:String = #function , line :Int = #line){
        if isOpen{
            print("---------\(file.lastPathComponent)[\(line)] , \(method): \(message)")
        }
    }
}
